package com.cloud.mall.sms.service;

import com.cloud.mall.api.CommonPage;
import com.cloud.mall.base.BaseResponse;
import com.cloud.mall.sms.input.SmsHomeNewProductInpDTO;
import com.cloud.mall.sms.out.SmsHomeNewProductOut;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Api(tags = "首页新品管理")
@RequestMapping("/home/newProduct")
public interface SmsHomeNewProductService {


    @ApiOperation("添加首页推荐品牌")
    @PostMapping("/create")
    BaseResponse create(@RequestBody List<SmsHomeNewProductInpDTO> homeNewProductInputDTO);

    @ApiOperation("批量删除推荐")
    @PostMapping("/delete")
    BaseResponse delete(@RequestParam("ids") List<Long> ids);

    @ApiOperation("修改推荐排序")
    @PostMapping("/update/sort/{id}")
    BaseResponse updateSort(@PathVariable Long id, Integer sort);

    @ApiOperation("批量修改推荐状态")
    @PostMapping("/update/recommendStatus")
    BaseResponse updateRecommendStatus(@RequestParam("ids") List<Long> ids, @RequestParam Integer recommendStatus);


    @ApiOperation("分页查询推荐品牌")
    @GetMapping("/list")
    BaseResponse<CommonPage<SmsHomeNewProductOut>> list(@RequestParam(value = "productName", required = false) String productName,
                                                        @RequestParam(value = "recommendStatus", required = false) Integer recommendStatus,
                                                        @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                        @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum);

}
